CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 enable o disable buttons insert,update,delete

Print topic Send  topic

Author Message
Oscar Salinas
Posted: 09/13/2002, 11:11 AM

Hi.
It is possible within cc, enable o disable the buttons insert, update and
erase depending on the value of a field of the data base.
Am i using PHP4 with templates and MySql.
Thanks for the help.


Manny Ramirez
Posted: 09/15/2002, 5:42 PM

I am after the same solution but for ASP. I have booking system, and i need
to have the check-out button disappear when book has already been
checked-out.

Ta
Manny Ramirez
"Oscar Salinas" <osalinas@ops.org.sv> wrote in message
news:alt9p5$5f7$1@news.codecharge.com...
> Hi.
> It is possible within cc, enable o disable the buttons insert, update and
> erase depending on the value of a field of the data base.
> Am i using PHP4 with templates and MySql.
> Thanks for the help.
>
>
>

N! Xau
Posted: 09/17/2002, 1:37 AM


"Oscar Salinas" <osalinas@ops.org.sv> wrote in message
news:alt9p5$5f7$1@news.codecharge.com...
> Hi.
> It is possible within cc, enable o disable the buttons insert, update and
> erase depending on the value of a field of the data base.
> Am i using PHP4 with templates and MySql.
> Thanks for the help.

I've the same problem. Did you find a solution?

Alex

N! Xau
Posted: 09/17/2002, 6:47 AM


"Oscar Salinas" <osalinas@ops.org.sv> wrote in message
news:alt9p5$5f7$1@news.codecharge.com...
> Hi.
> It is possible within cc, enable o disable the buttons insert, update and
> erase depending on the value of a field of the data base.

I just got how to disable buttons. In the form custom action events you can
find this code:
//-------------------------------
// Execute SQL statement
//-------------------------------
if(strlen($sRecordErr)) return;
if($bExecSQL)
$db->query($sSQL);
header("Location: " . $sActionFileName);
exit;
//----------------

just put it under a IF statement like I did to check user's identity:

$usn = get_session("UserID");
if ($usn==10 || $usn==45) {
//-------------------------------
// Execute SQL statement
...
}

this to allow the use of buttons to users having id=10 or id=45.
The next step: to HIDE buttons to users not allowed to use them.

Ciao.
Alessandro


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.